#!/bin/sh

# replace environment variable because this version of filebeat doesn't support environment variable in the config yaml file.
sed -i 's/\${DATAKIT_HOST}/'"${DATAKIT_HOST}"'/g' /usr/share/filebeat/filebeat.yml
/usr/share/filebeat/filebeat -c /usr/share/filebeat/filebeat.yml
